package com.gjs.freechat.server.dao.mapper;

import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.gjs.freechat.server.component.bean.UserInfo;

public interface UserInfoMapper {
	
	//public String validateUser(@Param("userKey") String userKey, @Param("way") Integer way);
	public UserInfo getUserInfo(@Param("way") int way, String... info);
	public String[] getAllAvatarIconName();
	public List<Map<String, Object>> getAllAvatarIcons();
	public List<String> getAllInterestTags();
	public List<Map<String, Object>> selectAllAvatarColors();
	public boolean saveNewUserInfo(UserInfo userInfo);
	public boolean saveNewUserPassword(UserInfo userInfo);
	public void loginRegister(String userId);
	public void logoutRegister(String userId);
	public void updateUserInfo(UserInfo userInfo);
	public boolean userRegister(String userId, String email, String password) throws SQLIntegrityConstraintViolationException;
	public boolean editUsername(String userId, String username) throws SQLIntegrityConstraintViolationException;
	public void updatePassword(String userId, String newPass);
}
